5 unsigned int dp
[101][101];
11 while (cin
>> w
>> h
&& w
&& h
){
12 for (int i
=0; i
<=w
; ++i
){
13 for (int j
=0; j
<=h
; ++j
){
14 dp
[i
][j
] = wolf
[i
][j
] = 0;
26 for (int i
=0; i
<=w
; ++i
){
27 for (int j
=0; j
<=h
; ++j
){
29 if (i
> 0) dp
[i
][j
] += dp
[i
-1][j
];
30 if (j
> 0) dp
[i
][j
] += dp
[i
][j
-1];
37 cout
<< "There is no path." << endl
;
40 if (t
== 1) cout
<< "is one path";
41 else cout
<< "are " << t
<< " paths";
42 cout
<< " from Little Red Riding Hood's house to her grandmother's house." << endl
;